<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>userManagement</title>
    <!--移动设备优先，响应式-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css"
          integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
    <link href="../style/systemInfo.css" rel="stylesheet">

    <!-- 可选的Bootstrap主题文件（一般不使用） -->
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"></script>

    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"
            integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
    <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
    <script src='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'></script>

    <link rel="stylesheet" href="../style/index.css">
    <link rel="stylesheet" href="../style/userManagement.css">
    <script src="../script/userManage.js" type="text/javascript"></script>
</head>
<body>
<div class="my-container" style="background-image: url(../image/header.jpg)">
    <div class="container">
        <div class="page-header">
            <h2 style="color: white">慢阻肺患者家庭护理数据采集与控制系统</h2>
        </div>
    </div>
</div>

<nav>
    <div class="navbar navbar-inverse">
        <div class="container">
            <div class="navbar-header">
                <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="../mainWindows.html" onclick="_hmt.push(['_trackEvent', 'navbar', 'click', 'navbar-首页'])">首页</a>
            </div>
            <div class="navbar-collapse collapse" role="navigation">
                <ul class="nav navbar-nav">
                    <li><a href="systemInfo.html" >健康分析</a></li>
                    <li><a href="devManagement.html">实时数据</a></li>
                    <li><a href="userManagement.html">个人信息</a></li>
                    <li class="hidden-sm"><a href="about.html">关于</a></li>
                </ul>
            </div>
        </div>
    </div>
</nav>

<section  style="height: 65vh; background-color: oldlace">
    <div id="content-left"></div>
    <div id="content-body">
        <p id="Myname"></p>
        <p id="Myemail"></p>
        <p id="Mytel"></p>
        <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">修改密码</button>
        <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#iModal">修改信息</button>
    </div>

    <!--//修改密码-->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h3 class="modal-title" id="myModalLabel" style="color: black">修改密码</h3>
                <form id="changepass" onsubmit="return false"  action="##" method="post">
                    <div class="modal-body">
                        <div class="container">
                            <div class="form-group form-input">
                                <label for="oldpass">旧密码</label>
                                <div style="width: 30%">
                                    <input type="password" class="form-control" id="oldpass" placeholder="请输入旧密码">
                                    <div style="color: red;">必填</div>
                                </div>
                            </div>
                            <div class="form-group form-input">
                                <label for="newpass">新密码</label>
                                <div style="width: 30%">
                                    <input type="password" class="form-control" id="newpass" placeholder="请输入新密码">
                                    <div style="color: red;">密码为6到15位字母或数字</div>
                                </div>
                            </div>
                            <div class="form-group form-input">
                                <label for="newpass2">确认新密码</label>
                                <div style="width: 30%">
                                    <input type="password" class="form-control" id="newpass2" placeholder="请再次输入新密码">
                                    <div style="color: red;">必填</div>
                                </div>
                            </div>
                        </div>
                        <p class="alert" style="color: red; text-align: center"></p>
                    </div>
                    <div class="modal-footer">
                        <div class="form-group" style="text-align: center;">
                            <input type="button" class="btn btn-default btn-lg btn-primary" id="chgpass" onclick="changepw()" value="确认修改">
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <!--//修改信息-->
    <div class="modal fade" id="iModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h3 class="modal-title" id="iModalLabel" style="color: black">修改信息</h3>
                <form id="changeinfo" onsubmit="return false"  action="##" method="post">
                    <div class="modal-body">
                        <div class="container">
                            <div class="form-group form-input">
                                <label for="username2">用户名</label>
                                <div style="width: 30%">
                                    <input type="text" class="form-control" id="username2" placeholder="请输入用户名">
                                </div>
                            </div>
                            <div class="form-group form-input">
                                <label for="email">邮箱</label>
                                <div style="width: 30%">
                                    <input type="email" class="form-control" id="email" placeholder="请输入邮箱">
                                </div>
                            </div>
                            <div class="form-group form-input">
                                <label for="phone">手机</label>
                                <div style="width: 30%">
                                    <input type="text" class="form-control" id="phone" placeholder="请输入手机">
                                </div>
                            </div>
                        </div>
                        <p class="alert" style="color: red; text-align: center"></p>
                    </div>
                    <div class="modal-footer">
                        <div class="form-group"  style="text-align: center";>
                            <input type="button" class="btn btn-default btn-lg btn-primary" id="chginfo" onclick="changeinfo()" value="确认修改">
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <div id="content-right"></div>
</section>



<footer>
    <div class="foot">
        <h5 style="text-align: center">软件工程导论课程团队项目  @  Coding</h5>
    </div>
</footer>

<script>
    var name = localStorage.getItem('username')
    var email = localStorage.getItem('email')
    var tel = localStorage.getItem('tel')

    $('#Myname').text("用 户 名："+ name)
    $('#Myemail').text("邮    箱：" + email)
    $('#Mytel').text("手    机：" + tel)

    $('#username2').val(name)
    $('#email').val(email)
    $('#phone').val(tel)
</script>

</body>
</html>